var windowName = "articlesInfo";
var Page,news;
apiready = function(){

    // onWindowShow(function () {
    // })
    onWindowHide(function () {
    })

    news = new List()
    Page = createVM("#Page",{
        //页面数据
        item:{
            "id":2,
            "cat":"/api_/article_categories/3",
            "title":"数据加载中……",
            "intro":"数据加载中……",
            "content":"数据加载中……",
            "pic":"/qz/ac1535b41060554a0ae147e3f714e6f5.jpg",
            "createAt":"2020-02-07T10:42:00+08:00",
            "view":1
        }
    },{
        //页面方法
        "init":function () {
            var data = getData4Page()
            var id = data.id;
            apiGet("/api/articles/"+id,{},function (res,code) {
                if (code == 200) {
                    Page.item = res.data
                }
            })
        },
        OnPullDownRefresh:function () {
            // startPullDownRefresh()
            // news.reload()
        },
        OnPullUpLoadMore:function () {
            // startPullUpLoadMore()
            // news.getList()
        },
    })
    Page.init()
}